package com.jplus.enums;

import lombok.Getter;

@Getter
public enum ResultEnum {

    SUCCESS(0, "成功"),

    PARAM_ERROR(1, "参数不正确"),

    USER_NOT_IN_DB(2, "数据库不存在此用户"),

    ORDER_CREATE_ERROR(10, "订单创建失败"),

    ORDER_NOT_EXIST(12, "订单不存在"),

    ORDERDETAIL_NOT_EXIST(13, "订单详情不存在"),

    ORDER_STATUS_ERROR(14, "订单状态不正确"),

    ORDER_UPDATE_FAIL(15, "订单更新失败"),

    ORDER_DETAIL_EMPTY(16, "订单详情为空"),

    ORDER_PAY_STATUS_ERROR(17, "订单支付状态不正确"),

    ORDER_OWNER_ERROR(19, "该订单不属于当前用户"),

    ORDER_CANCEL_SUCCESS(22, "订单取消成功"),

    ORDER_FINISH_SUCCESS(23, "订单完结成功"),

    LOGIN_FAIL(25, "登录失败, 登录信息不正确"),

    LOGOUT_SUCCESS(26, "登出成功"),

    REGISTER_FAIL(27, "注册失败"),

    LOGOUT_FAILED(28, "登出失败"),

    TOPIC_LODING_ERROR(30, "话题加载失败"),

    COMMENT_REPEAT_FORBIDDEN(40, "禁止重复评论"),

    TIMER_ERROR(41, "计时器运行出错，可能找不到业务id"),

    ORDER_ACCEPT_FAILED(41, "接单失败"),

    ORDER_PUSH_FAILED(42, "订单推送失败"),

    ORDER_CANCEL_FAILED(43, "订单取消失败")
    ;

    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
